package com.csu.mall.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.csu.mall.product.entity.AttrEntity;
import com.csu.mall.product.entity.AttrGroupEntity;
import com.csu.mall.product.vo.AttrGroupVo;
import com.csu.mall.product.vo.SpuItemAttrGroupVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 属性分组
 * 
 * @author zhenhuanli
 * @email 743879362@qq.com
 * @date 2022-09-16 11:42:54
 */
@Mapper
public interface AttrGroupDao extends BaseMapper<AttrGroupEntity> {

    void deleteAttrAttrGroupRelation(@Param("attrId") Long attrId,@Param("attrGroupId") Long attrGroupId);

    List<AttrEntity> selectEnableAttr(@Param("attrgroupId") Long attrgroupId);

    List<AttrGroupEntity> getAttrGroup(Long catelogId);

    List<SpuItemAttrGroupVo> getAttrGroupWithAttrsBySpuId(Long spuId, Long catalogId);
}
